﻿/*-----------------------------------------------
// File: ItemIconTemplate.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;

namespace UI
{
    public class ItemIconTemplate : IconTemplate 
    {
        public UILabel numLabel;
        public void SetItem(string id, int num) {
            var di = Dict.Blo.DictItemBlo.GetTableItem(id);
            SetIcon(TextureIcon.ITEM, di.icon);
            numLabel.text = num.ToString();
        }

        public void SetCoin(int num) {
            SetIcon(TextureIcon.ITEM, "item_icon_200");
            numLabel.text = num.ToString();
        }

        public void SetDiamond(int num) {
            SetIcon(TextureIcon.ITEM, "item_icon_201");
            numLabel.text = num.ToString();
        }

        public void SetPopularity(int num) {
            SetIcon(TextureIcon.ITEM, Dict.Config.TableConst.popularity);
            numLabel.text = num.ToString();
        }

    }
}